Disable build in setup.py
authorShengjing Zhu <zhsj@debian.org>
Fri, 2 Aug 2024 09:13:32 +0000 (17:13 +0800)
committerShengjing Zhu <zhsj@debian.org>
Sat, 3 Aug 2024 05:36:08 +0000 (13:36 +0800)
debian/patches/0002-data-Explicitly-use-python3.patch [new file with mode: 0644]
debian/patches/0003-data-Explicitly-use-python3.patch [deleted file]
debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch [new file with mode: 0644]
debian/patches/0004-Use-system-googletest.patch [new file with mode: 0644]
debian/patches/0004-no-remote-images-when-reading-docs-on-disk.patch [deleted file]
debian/patches/0005-Disable-build-in-setup.py.patch [new file with mode: 0644]
debian/patches/0005-Use-system-googletest.patch [deleted file]
debian/patches/series

diff --git a/debian/patches/0002-data-Explicitly-use-python3.patch b/debian/patches/0002-data-Explicitly-use-python3.patch
new file mode 100644 (file)
index 0000000..2e4d3ac
--- /dev/null
@@ -0,0 +1,65 @@
+From: Boyuan Yang <byang@debian.org>
+Date: Thu, 25 Jun 2020 20:32:44 -0400
+Subject: data/: Explicitly use python3
+
+Before "python" is default to python3, this patch should be kept.
+
+Last-Update: 2020-06-25
+---
+ data/scripts/find_target.py | 2 +-
+ data/scripts/merge.py       | 2 +-
+ data/scripts/reverse.py     | 2 +-
+ data/scripts/sort.py        | 2 +-
+ data/scripts/sort_all.py    | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/data/scripts/find_target.py b/data/scripts/find_target.py
+index 4244949..7b2b477 100755
+--- a/data/scripts/find_target.py
++++ b/data/scripts/find_target.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ import sys
+diff --git a/data/scripts/merge.py b/data/scripts/merge.py
+index 680c90e..01fcf51 100755
+--- a/data/scripts/merge.py
++++ b/data/scripts/merge.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ import codecs
+diff --git a/data/scripts/reverse.py b/data/scripts/reverse.py
+index 746f887..a87ae46 100755
+--- a/data/scripts/reverse.py
++++ b/data/scripts/reverse.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ import sys
+diff --git a/data/scripts/sort.py b/data/scripts/sort.py
+index f7d4dc5..6ad6e8c 100755
+--- a/data/scripts/sort.py
++++ b/data/scripts/sort.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ import sys
+diff --git a/data/scripts/sort_all.py b/data/scripts/sort_all.py
+index bd57ae7..c742413 100755
+--- a/data/scripts/sort_all.py
++++ b/data/scripts/sort_all.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ import glob
+ import sys
diff --git a/debian/patches/0003-data-Explicitly-use-python3.patch b/debian/patches/0003-data-Explicitly-use-python3.patch
deleted file mode 100644 (file)
index 2e4d3ac..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From: Boyuan Yang <byang@debian.org>
-Date: Thu, 25 Jun 2020 20:32:44 -0400
-Subject: data/: Explicitly use python3
-
-Before "python" is default to python3, this patch should be kept.
-
-Last-Update: 2020-06-25
----
- data/scripts/find_target.py | 2 +-
- data/scripts/merge.py       | 2 +-
- data/scripts/reverse.py     | 2 +-
- data/scripts/sort.py        | 2 +-
- data/scripts/sort_all.py    | 2 +-
- 5 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/data/scripts/find_target.py b/data/scripts/find_target.py
-index 4244949..7b2b477 100755
---- a/data/scripts/find_target.py
-+++ b/data/scripts/find_target.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- import sys
-diff --git a/data/scripts/merge.py b/data/scripts/merge.py
-index 680c90e..01fcf51 100755
---- a/data/scripts/merge.py
-+++ b/data/scripts/merge.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- import codecs
-diff --git a/data/scripts/reverse.py b/data/scripts/reverse.py
-index 746f887..a87ae46 100755
---- a/data/scripts/reverse.py
-+++ b/data/scripts/reverse.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- import sys
-diff --git a/data/scripts/sort.py b/data/scripts/sort.py
-index f7d4dc5..6ad6e8c 100755
---- a/data/scripts/sort.py
-+++ b/data/scripts/sort.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- import sys
-diff --git a/data/scripts/sort_all.py b/data/scripts/sort_all.py
-index bd57ae7..c742413 100755
---- a/data/scripts/sort_all.py
-+++ b/data/scripts/sort_all.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- import glob
- import sys
diff --git a/debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch b/debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch
new file mode 100644 (file)
index 0000000..8a4c445
--- /dev/null
@@ -0,0 +1,29 @@
+From: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+Date: Sun, 28 Jul 2024 19:42:55 -0400
+Subject: Don't fetch remote images when reading docs on disk
+
+This fixes a privacy breach previously reported as Lintian warnings
+
+Forwarded: not-needed
+Last-Update: 2024-07-28
+---
+ README.md | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/README.md b/README.md
+index e4edffb..cc22afd 100644
+--- a/README.md
++++ b/README.md
+@@ -1,12 +1,5 @@
+ # Open Chinese Convert 開放中文轉換
+-[![CMake](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml)
+-[![Bazel](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml)
+-[![MSVC](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml)
+-[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml)
+-[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml)
+-[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC)
+-
+ ## Introduction 介紹
+ ![OpenCC](https://opencc.byvoid.com/img/opencc.png)
diff --git a/debian/patches/0004-Use-system-googletest.patch b/debian/patches/0004-Use-system-googletest.patch
new file mode 100644 (file)
index 0000000..2309815
--- /dev/null
@@ -0,0 +1,23 @@
+From: Shengjing Zhu <zhsj@debian.org>
+Date: Sun, 28 Jul 2024 19:44:27 -0400
+Subject: Use system googletest
+
+Forwarded: not-needed
+Last-Update: 2024-07-28
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6db5fa1..fcdedeb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -231,6 +231,8 @@ add_subdirectory(test)
+ if (ENABLE_GTEST)
+   if(NOT USE_SYSTEM_GTEST)
+     add_subdirectory(deps/googletest-1.15.0)
++  else()
++    add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL)
+   endif()
+   enable_testing()
+ endif()
diff --git a/debian/patches/0004-no-remote-images-when-reading-docs-on-disk.patch b/debian/patches/0004-no-remote-images-when-reading-docs-on-disk.patch
deleted file mode 100644 (file)
index 8a4c445..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
-Date: Sun, 28 Jul 2024 19:42:55 -0400
-Subject: Don't fetch remote images when reading docs on disk
-
-This fixes a privacy breach previously reported as Lintian warnings
-
-Forwarded: not-needed
-Last-Update: 2024-07-28
----
- README.md | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/README.md b/README.md
-index e4edffb..cc22afd 100644
---- a/README.md
-+++ b/README.md
-@@ -1,12 +1,5 @@
- # Open Chinese Convert 開放中文轉換
--[![CMake](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml)
--[![Bazel](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml)
--[![MSVC](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml)
--[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml)
--[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml)
--[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC)
--
- ## Introduction 介紹
- ![OpenCC](https://opencc.byvoid.com/img/opencc.png)
diff --git a/debian/patches/0005-Disable-build-in-setup.py.patch b/debian/patches/0005-Disable-build-in-setup.py.patch
new file mode 100644 (file)
index 0000000..e08a956
--- /dev/null
@@ -0,0 +1,20 @@
+From: Shengjing Zhu <zhsj@debian.org>
+Date: Fri, 2 Aug 2024 17:11:08 +0800
+Subject: Disable build in setup.py
+
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
+index a4bc500..f32590e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -62,6 +62,7 @@ def get_long_description():
+ def build_libopencc(output_path):
++    return
+     print('building libopencc into %s' % _build_dir)
+     is_windows = sys.platform == 'win32'
diff --git a/debian/patches/0005-Use-system-googletest.patch b/debian/patches/0005-Use-system-googletest.patch
deleted file mode 100644 (file)
index 2309815..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Shengjing Zhu <zhsj@debian.org>
-Date: Sun, 28 Jul 2024 19:44:27 -0400
-Subject: Use system googletest
-
-Forwarded: not-needed
-Last-Update: 2024-07-28
----
- CMakeLists.txt | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6db5fa1..fcdedeb 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -231,6 +231,8 @@ add_subdirectory(test)
- if (ENABLE_GTEST)
-   if(NOT USE_SYSTEM_GTEST)
-     add_subdirectory(deps/googletest-1.15.0)
-+  else()
-+    add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL)
-   endif()
-   enable_testing()
- endif()
index 481132a5d2d7332ac819bf19f276c2d998f1273c..b62fc18c1b1ee0cc6f35a576d3b867ddec1cf72f 100644 (file)
@@ -1,4 +1,5 @@
 0001-use-cmake-install-libdir.patch
-0003-data-Explicitly-use-python3.patch
-0004-no-remote-images-when-reading-docs-on-disk.patch
-0005-Use-system-googletest.patch
+0002-data-Explicitly-use-python3.patch
+0003-no-remote-images-when-reading-docs-on-disk.patch
+0004-Use-system-googletest.patch
+0005-Disable-build-in-setup.py.patch